#include <iostream>
#include <cstring>

using namespace std;

const int N = 23,INF = 0x3f3f3f3f;
int h[N];

// Harh(key) = Addr;

void ini()
{
    memset(h, 0x3f, sizeof h);
}

int f(int x)
{
    int id = (x % N + N) % N;

    while(h[id] != INF && h[id] != x)
    {
        id++;
        if(id == N) id = 0;
    }
    return id;
}
// 查询函数
bool find(int x)
{
    int id = f(x);
    return h[id] == x;
}

// 插入函数
void insert(int x)
{
    int id = f(x);
    h[id] = x;
}
int main()
{
    ini();
    int n; cin >> n;
    while(n--)
    {
        int op,x;
        cin >> op >> x;
        if(1 == op)
        {
            insert(x);
        }else
        {
            if(find(x)) cout << "yes" << endl;
            else cout << "no" << endl;
        }
    }
    return 0;
}